package com.example.cluster.mapper.generator;

import com.example.cluster.mapper.po.LiteraturePo;
import com.example.cluster.mapper.po.LiteraturePoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface LiteraturePoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @Delete({
        "delete from literature",
        "where `literature_id` = #{literatureId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer literatureId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @Insert({
        "insert into literature (`literature_id`, `batch`, ",
        "`doc_id`, `journal_code`, ",
        "`title`, `summary`, ",
        "`keyword`, `classification`, ",
        "`language`, `start_page`, ",
        "`end_page`, `total_page_num`, ",
        "`type`, `author_name`, ",
        "`affiliation`, `issn`, ",
        "`cn`, `host_title`, `year`, ",
        "`volume`, `issue`, `procession_unit`, ",
        "`holding_number`, `library_code`, ",
        "`project_id`)",
        "values (#{literatureId,jdbcType=INTEGER}, #{batch,jdbcType=VARCHAR}, ",
        "#{docId,jdbcType=VARCHAR}, #{journalCode,jdbcType=VARCHAR}, ",
        "#{title,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, ",
        "#{keyword,jdbcType=VARCHAR}, #{classification,jdbcType=VARCHAR}, ",
        "#{language,jdbcType=VARCHAR}, #{startPage,jdbcType=INTEGER}, ",
        "#{endPage,jdbcType=INTEGER}, #{totalPageNum,jdbcType=INTEGER}, ",
        "#{type,jdbcType=VARCHAR}, #{authorName,jdbcType=VARCHAR}, ",
        "#{affiliation,jdbcType=VARCHAR}, #{issn,jdbcType=VARCHAR}, ",
        "#{cn,jdbcType=VARCHAR}, #{hostTitle,jdbcType=VARCHAR}, #{year,jdbcType=DATE}, ",
        "#{volume,jdbcType=VARCHAR}, #{issue,jdbcType=VARCHAR}, #{processionUnit,jdbcType=VARCHAR}, ",
        "#{holdingNumber,jdbcType=VARCHAR}, #{libraryCode,jdbcType=VARCHAR}, ",
        "#{projectId,jdbcType=INTEGER})"
    })
    int insert(LiteraturePo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @InsertProvider(type=LiteraturePoSqlProvider.class, method="insertSelective")
    int insertSelective(LiteraturePo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @SelectProvider(type=LiteraturePoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="literature_id", property="literatureId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="batch", property="batch", jdbcType=JdbcType.VARCHAR),
        @Result(column="doc_id", property="docId", jdbcType=JdbcType.VARCHAR),
        @Result(column="journal_code", property="journalCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="summary", property="summary", jdbcType=JdbcType.VARCHAR),
        @Result(column="keyword", property="keyword", jdbcType=JdbcType.VARCHAR),
        @Result(column="classification", property="classification", jdbcType=JdbcType.VARCHAR),
        @Result(column="language", property="language", jdbcType=JdbcType.VARCHAR),
        @Result(column="start_page", property="startPage", jdbcType=JdbcType.INTEGER),
        @Result(column="end_page", property="endPage", jdbcType=JdbcType.INTEGER),
        @Result(column="total_page_num", property="totalPageNum", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="author_name", property="authorName", jdbcType=JdbcType.VARCHAR),
        @Result(column="affiliation", property="affiliation", jdbcType=JdbcType.VARCHAR),
        @Result(column="issn", property="issn", jdbcType=JdbcType.VARCHAR),
        @Result(column="cn", property="cn", jdbcType=JdbcType.VARCHAR),
        @Result(column="host_title", property="hostTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="year", property="year", jdbcType=JdbcType.DATE),
        @Result(column="volume", property="volume", jdbcType=JdbcType.VARCHAR),
        @Result(column="issue", property="issue", jdbcType=JdbcType.VARCHAR),
        @Result(column="procession_unit", property="processionUnit", jdbcType=JdbcType.VARCHAR),
        @Result(column="holding_number", property="holdingNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="library_code", property="libraryCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="project_id", property="projectId", jdbcType=JdbcType.INTEGER)
    })
    List<LiteraturePo> selectByExample(LiteraturePoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "`literature_id`, `batch`, `doc_id`, `journal_code`, `title`, `summary`, `keyword`, ",
        "`classification`, `language`, `start_page`, `end_page`, `total_page_num`, `type`, ",
        "`author_name`, `affiliation`, `issn`, `cn`, `host_title`, `year`, `volume`, ",
        "`issue`, `procession_unit`, `holding_number`, `library_code`, `project_id`",
        "from literature",
        "where `literature_id` = #{literatureId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="literature_id", property="literatureId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="batch", property="batch", jdbcType=JdbcType.VARCHAR),
        @Result(column="doc_id", property="docId", jdbcType=JdbcType.VARCHAR),
        @Result(column="journal_code", property="journalCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="summary", property="summary", jdbcType=JdbcType.VARCHAR),
        @Result(column="keyword", property="keyword", jdbcType=JdbcType.VARCHAR),
        @Result(column="classification", property="classification", jdbcType=JdbcType.VARCHAR),
        @Result(column="language", property="language", jdbcType=JdbcType.VARCHAR),
        @Result(column="start_page", property="startPage", jdbcType=JdbcType.INTEGER),
        @Result(column="end_page", property="endPage", jdbcType=JdbcType.INTEGER),
        @Result(column="total_page_num", property="totalPageNum", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="author_name", property="authorName", jdbcType=JdbcType.VARCHAR),
        @Result(column="affiliation", property="affiliation", jdbcType=JdbcType.VARCHAR),
        @Result(column="issn", property="issn", jdbcType=JdbcType.VARCHAR),
        @Result(column="cn", property="cn", jdbcType=JdbcType.VARCHAR),
        @Result(column="host_title", property="hostTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="year", property="year", jdbcType=JdbcType.DATE),
        @Result(column="volume", property="volume", jdbcType=JdbcType.VARCHAR),
        @Result(column="issue", property="issue", jdbcType=JdbcType.VARCHAR),
        @Result(column="procession_unit", property="processionUnit", jdbcType=JdbcType.VARCHAR),
        @Result(column="holding_number", property="holdingNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="library_code", property="libraryCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="project_id", property="projectId", jdbcType=JdbcType.INTEGER)
    })
    LiteraturePo selectByPrimaryKey(Integer literatureId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @UpdateProvider(type=LiteraturePoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("row") LiteraturePo row, @Param("example") LiteraturePoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @UpdateProvider(type=LiteraturePoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("row") LiteraturePo row, @Param("example") LiteraturePoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @UpdateProvider(type=LiteraturePoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LiteraturePo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table literature
     *
     * @mbg.generated
     */
    @Update({
        "update literature",
        "set `batch` = #{batch,jdbcType=VARCHAR},",
          "`doc_id` = #{docId,jdbcType=VARCHAR},",
          "`journal_code` = #{journalCode,jdbcType=VARCHAR},",
          "`title` = #{title,jdbcType=VARCHAR},",
          "`summary` = #{summary,jdbcType=VARCHAR},",
          "`keyword` = #{keyword,jdbcType=VARCHAR},",
          "`classification` = #{classification,jdbcType=VARCHAR},",
          "`language` = #{language,jdbcType=VARCHAR},",
          "`start_page` = #{startPage,jdbcType=INTEGER},",
          "`end_page` = #{endPage,jdbcType=INTEGER},",
          "`total_page_num` = #{totalPageNum,jdbcType=INTEGER},",
          "`type` = #{type,jdbcType=VARCHAR},",
          "`author_name` = #{authorName,jdbcType=VARCHAR},",
          "`affiliation` = #{affiliation,jdbcType=VARCHAR},",
          "`issn` = #{issn,jdbcType=VARCHAR},",
          "`cn` = #{cn,jdbcType=VARCHAR},",
          "`host_title` = #{hostTitle,jdbcType=VARCHAR},",
          "`year` = #{year,jdbcType=DATE},",
          "`volume` = #{volume,jdbcType=VARCHAR},",
          "`issue` = #{issue,jdbcType=VARCHAR},",
          "`procession_unit` = #{processionUnit,jdbcType=VARCHAR},",
          "`holding_number` = #{holdingNumber,jdbcType=VARCHAR},",
          "`library_code` = #{libraryCode,jdbcType=VARCHAR},",
          "`project_id` = #{projectId,jdbcType=INTEGER}",
        "where `literature_id` = #{literatureId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(LiteraturePo row);
}